#!/bin/bash

# 生产环境一键启动脚本

echo "🚀 启动生产环境..."

# 切换到生产环境配置
./env.sh prod

echo ""
echo "🐳 构建并启动Docker容器..."

# 启动生产环境 (静态构建)
docker-compose up -d --build

echo ""
echo "✅ 生产环境启动完成！"
echo ""
echo "🌐 访问地址:"
echo "  应用首页: http://localhost"
echo "  后端 API: http://localhost:8000/api/"
echo "  Django Admin: http://localhost:8000/admin/"
echo "  API文档: http://localhost:8000/api/docs/"
echo ""
echo "👤 默认管理员账号:"
echo "  用户名: admin"
echo "  密码: admin123"
echo ""
echo "📋 常用命令:"
echo "  查看日志: docker-compose logs -f"
echo "  停止服务: docker-compose down"
echo "  重启服务: docker-compose restart"
